<template>
  <div class="about">

    <el-row>
      <el-button>默认按钮</el-button>
      <el-button type="primary">主要按钮</el-button>
      <el-button type="success">成功按钮</el-button>
      <el-button type="info">信息按钮</el-button>
      <el-button type="warning">警告按钮</el-button>
      <el-button type="danger">危险按钮</el-button>
    </el-row>
    <hr>
    <el-button @click="giteeLogin" type="success">码云登录</el-button>
    <el-button @click="Oauth2Login" type="primary">Oauth2登录</el-button>
  </div>
</template>
<script>
export default {
  data() {
    return {

    }
  },
  methods: {
    //将用户引导到码云登录页面
    giteeLogin(){
      window.open("https://gitee.com/oauth/authorize?client_id=7fb8c7c5f6061a82c2c43f300657185a20a3b49faad7e39cfa1403505628e3cb&redirect_uri=http://127.0.0.1:8080/callback&response_type=code")
    },
    //跳到自己写的登录
    Oauth2Login(){
      this.axios.get("http://127.0.0.1:8888/api/user/getLoginUrl").then(resp=>{
        let loginUrl = resp.data
        window.open(loginUrl)
      })
    }
  }
}
</script>